<?php
include ('config.php');
$fb = new Facebook\Facebook([
    'app_id' => $app_id, // Replace {app-id} with your app id
    'app_secret' => $app_secret,
    'default_graph_version' => $default_graph_version
]);

$helper = $fb->getRedirectLoginHelper();

$permissions = [
    'email'
]; // Optional permissions
$loginUrl = $helper->getLoginUrl('https://mhs.1322.com/asm/fb/fb-callback.php', $permissions);

echo '<a href="' . htmlspecialchars($loginUrl) . '">Login with Facebook!</a>'; 